<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Send a signal to a process</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.posix-kill" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_kill</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">posix_kill</span> &mdash; <span class="dc-title">Send a signal to a process</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.posix-kill-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>posix_kill</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$pid</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$sig</code></span>
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Send the signal <code class="parameter">sig</code> to the process with
   the process identifier <code class="parameter">pid</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.posix-kill-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">pid</code></dt>

     <dd>

      <p class="para">
       The process identifier.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">sig</code></dt>

     <dd>

      <p class="para">
       One of the <a href="pcntl.constants.html" class="link">PCNTL signals constants</a>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-kill-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.posix-kill-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member">
     The kill(2) manual page of the POSIX system, which contains additional
     information about negative process identifiers, the special pid 0, the
     special pid -1, and the signal number 0.
    </li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>